﻿#include "WinFormBasic_GUI.cpp"

int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR lpCmdLine, int nCmdShow)
{
    LPCWSTR windowClass = L"MYCLASS";
    const wchar_t *windowTitle = L"中文窗体";                       // 确保使用宽字符
    InitializeWindowClass(hInstance,windowClass);                  // 初始化窗口类
    HWND hwndWindows = CreateWindowExW(0,windowClass, windowTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 1050, 844, NULL, NULL, hInstance, NULL);
    Frame hwndFrame1(hwndWindows, L"中文框架", 8, 472, 369, 137, 3);                     // 修改为宽字符文本
    OptionButton hwndOption1(hwndWindows, L"选项按钮", 160, 704, 81, 49, 4);             // 修改为宽字符文本
    CheckBox hwndCheck1(hwndWindows, L"复选框", 8, 704, 81, 49, 5);                      // 修改为宽字符文本
    CommandButton hwndCommand1(hwndWindows, L"命令按钮", 584, 712, 441, 57, 6);          // 修改为宽字符文本
    Label hwndLabel1(hwndWindows, L"标签", 8, 40, 201, 129, 7);                          // 修改为宽字符文本
    RichTextBox hwndRichTextBox1(hwndWindows, 640, 472, 361, 129, hInstance, HMENU(11)); // 修正：添加括号调用构造函数

    DragAcceptFiles(hwndWindows, TRUE); // 启用拖放功能
    Auto_load_ICO(hwndWindows);         // 加载图标
    ShowWindow(hwndWindows, nCmdShow);  // 显示窗口
    UpdateWindow(hwndWindows);          // 更新窗口
    return RunMessageLoop();            // 消息循环
}

void Button_Event(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
}